<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->

<?php

    session_start();
    echo "Login: ".$_SESSION["userID"]." ".$_SESSION["userType"];
    
    // put your code here
    
    if(isset($_SESSION["userID"]) && !strcmp($_SESSION["userType"], "administrator")){

    $userID =$_GET["userID"];

    $con = mysql_connect("localhost", "zhouzhao", "19831022");
    if(!$con){
        die("could not connect to DB: ".mysql_error());
    }

    mysql_select_db("cloudcom", $con);

    mysql_query("delete from users where userID = $userID");

    mysql_close($con);

    echo "$userID";
    }else{
        require 'login.html';
    }

?>
